package com.pbs.contact;

public class IM {
	private String name;
	private int type;

	public static final int PROTOCOL_AIM = 0;
	public static final int PROTOCOL_MSN = 1;
	public static final int PROTOCOL_YAHOO = 2;
	public static final int PROTOCOL_SKYPE = 3;
	public static final int PROTOCOL_QQ = 4;
	public static final int PROTOCOL_GOOGLE_TALK = 5;
	public static final int PROTOCOL_ICQ = 6;
	public static final int PROTOCOL_JABBER = 7;
	public static final int PROTOCOL_NETMEETING = 8;
	public static final int PROTOCOL_CUSTOM = -1;

	public IM(){}
	
	public String getName() {
		return name;
	}

	
	
	public void setName(String name) {
		this.name = name;
	}

	public int getType() {
		return type;
	}

	public String getTypeName() {
		switch (type) {
		case PROTOCOL_AIM: {
			return "AIM";
		}
		case PROTOCOL_MSN: {
			return "MSN";
		}
		case PROTOCOL_YAHOO: {
			return "Yahoo";
		}
		case PROTOCOL_SKYPE: {
			return "Skype";
		}
		case PROTOCOL_QQ: {
			return "QQ";
		}
		case PROTOCOL_GOOGLE_TALK: {
			return "Google Talk";
		}
		case PROTOCOL_ICQ: {
			return "ICQ";
		}
		case PROTOCOL_JABBER: {
			return "Jabber";
		}
		case PROTOCOL_NETMEETING: {
			return "Netmeeting";
		}
		case PROTOCOL_CUSTOM: {
			return "Custom IM";
		}
		default: {
			return "Unknow";
		}
		}
	}

	public void setType(int type) {
		this.type = type;
	}

	// public IM(String name, int type) {
	// this.name = name;
	// this.type = type;
	// }

	public IM(String name, int type) {
		this.name = name;
		this.type = type;
	}
}
